<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
    <script src="https://cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js"></script>
</head>
<body>
    <div id="app">
        <!-- 命名路由 -->
        <router-view name="x"></router-view>
        <router-view name="y"></router-view>
        <router-view name="z"></router-view>
    </div>

    <template id="t1">
        <div>组件1</div>
    </template>
    <template id="t2">
        <div>组件2</div>
    </template>
    <template id="t3">
        <div>组件3</div>
    </template>

    <script>

        var c = {
            template: "#t1"
        };
        var c2 = {
            template: "#t2"
        };
        var c3 = {
            template: "#t3"
        };

        var router = new VueRouter({
            routes:[
                {
                    path:"/a", components: {  
                        "x": c, 
                        "y": c2,
                        "z": c3
                    }
                }, 
            ]
        });

        var app = new Vue({
            el: "#app",
            router
        });
    </script>
</body>
</html>